Skip to content

Add --name option to meorg output query#70

Merged
bschroeter merged 2 commits into
mainfrom
fix-model-output-query
Jun 15, 2026
Merged

Add --name option to meorg output query#70
bschroeter merged 2 commits into
mainfrom
fix-model-output-query

Conversation

@SeanBryan51

@SeanBryan51 SeanBryan51 commented May 28, 2026

Copy link
Copy Markdown
Contributor

The /modeloutput get endpoint requires specifying the name key when querying by name however meorg_client is currently fixed to always query by id.

This change adds a --name argument to meorg output query to allow for querying a model output by its name. For example:

meorg output query --name my-model-output

This change also updates the model_id argument to meorg output query to be optional as a way to preserve the existing signature of the command but still allow querying solely by the --name argument.

@SeanBryan51 SeanBryan51 force-pushed the fix-model-output-query branch 2 times, most recently from c3933c5 to 5aec200 Compare June 3, 2026 21:42
@SeanBryan51 SeanBryan51 force-pushed the fix-model-output-query branch from 5aec200 to ff86378 Compare June 10, 2026 22:10
@SeanBryan51 SeanBryan51 changed the title Add --by-name option to meorg output query Add --name option to meorg output query Jun 10, 2026
@SeanBryan51 SeanBryan51 force-pushed the fix-model-output-query branch from ff86378 to 3d22183 Compare June 10, 2026 22:15
The `/modeloutput` get endpoint requires specifying the `name` key when
querying by name however meorg_client is currently fixed to always query by id.

This change adds a `--name` argument to `meorg output query` to allow
for querying a model output by its name. For example:

    meorg output query --name my-model-output

This change also updates the `model_id` argument to `meorg output query`
to be optional as a way to preserve the existing signature of the
command but still allow querying solely by the `--name` argument.
@SeanBryan51 SeanBryan51 force-pushed the fix-model-output-query branch from 3d22183 to bb8291b Compare June 11, 2026 12:53
@bschroeter bschroeter self-requested a review June 11, 2026 23:27

@bschroeter bschroeter left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks OK, just a question on what happens if neither ID or name are supplied. Does it still work, or at least return a useful error?

Comment thread meorg_client/cli.py
@click.command("query")
@click.argument("model_id")
def model_output_query(model_id: str):
@click.option("--name", required=False, help="Name of model output entity.")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@SeanBryan51, what happens if neither is supplied?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch! I've updated the command to output the help text if no arguments are supplied with click's no_args_is_help in 0e54b47

@SeanBryan51

Copy link
Copy Markdown
Contributor Author

Thanks for the review @bschroeter, happy for this to go in when you are!

@SeanBryan51 SeanBryan51 requested a review from bschroeter June 12, 2026 11:57

@bschroeter bschroeter left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, merging.

@bschroeter bschroeter merged commit b6f6996 into main Jun 15, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants